public class Test1 {

}

class Data{
    private int year;
    private int month;

    public Data(int year, int month) {
        this.year = year;
        this.month = month;
    }

    @Override
    public String toString() {
        return "Data{" +
                "year=" + year +
                ", month=" + month +
                '}';
    }

    public void setYear(int year) {
        this.year = year;
    }

    public void setMonth(int month) {
        this.month = month;
    }

    public int getYear(){
        return year;
    }

    public int getMonth(){
        return month;
    }
}
